﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using eStock.DataObjects;

namespace eStock.ChildWindows
{
    /// <summary>
    /// Interaktionslogik für WndImageView.xaml
    /// </summary>
    public partial class WndImageView : Window
    {
        private readonly DBImage _databaseImage;

        public WndImageView(DBImage dbImage)
        {
            InitializeComponent();
            _databaseImage = dbImage;
            Loaded += WndImageViewLoaded;
            Title = _databaseImage.Title;
        }

        void WndImageViewLoaded(object sender, RoutedEventArgs e)
        {
            ImgPreview.Source = _databaseImage.Image.Source;
        }

        private void ButtonClick(object sender, RoutedEventArgs e)
        {
            Close();
        }
    }
}
